package leetcode.slidingwindow;

import leetcode.slidingwindow.common.SlidingWindowUtils;

class Solution1658 {
    public int minOperations(int[] nums, int x) {
        return SlidingWindowUtils.minOperations(nums, x);
    }
}

public class leetcode1658 {
    public static void main(String[] args) {
        Solution1658 solution1658 = new Solution1658();
        int[] nums = {1, 1, 4, 2, 3};
        int[] nums1 = {5, 6, 7, 8, 9};
        int[] nums2 = {3, 2, 20, 1, 1, 3};
        int[] nums3 = {8828, 9581, 49, 9818, 9974, 9869, 9991, 10000, 10000, 10000, 9999, 9993, 9904, 8819, 1231, 6309};
        int[] nums4 = {1, 1, 4, 2, 3};
        int[] nums5 = {1241, 8769, 9151, 3211, 2314, 8007, 3713, 5835, 2176, 8227, 5251, 9229, 904, 1899, 5513, 7878, 8663, 3804, 2685, 3501, 1204, 9742, 2578, 8849, 1120, 4687, 5902, 9929, 6769, 8171, 5150, 1343, 9619, 3973, 3273, 6427, 47, 8701, 2741, 7402, 1412, 2223, 8152, 805, 6726, 9128, 2794, 7137, 6725, 4279, 7200, 5582, 9583, 7443, 6573, 7221, 1423, 4859, 2608, 3772, 7437, 2581, 975, 3893, 9172, 3, 3113, 2978, 9300, 6029, 4958, 229, 4630, 653, 1421, 5512, 5392, 7287, 8643, 4495, 2640, 8047, 7268, 3878, 6010, 8070, 7560, 8931, 76, 6502, 5952, 4871, 5986, 4935, 3015, 8263, 7497, 8153, 384, 1136};
        System.out.println(solution1658.minOperations(nums, 5));
        System.out.println(solution1658.minOperations(nums1, 4));
        System.out.println(solution1658.minOperations(nums2, 10));
        System.out.println(solution1658.minOperations(nums3, 134365));
        System.out.println(solution1658.minOperations(nums4, 11));
        System.out.println(solution1658.minOperations(nums5, 894887480));
    }
}
